package net.mikoo.seals.api.model.ota;

import org.apache.commons.lang.StringUtils;

import net.mikoo.seals.api.model.BaseResponse;
import net.mikoo.seals.model.DevicesModel;

public class CheckUpdateResponse extends BaseResponse {

	private String path;

	private String version;
	
	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public static CheckUpdateResponse valueOf(DevicesModel model) {
		CheckUpdateResponse result = new CheckUpdateResponse();
		if(model == null) {
			return result;
		}
		result.setPath(model.getDrivePath());
		result.setVersion(model.getVersion());
		return result;
	}
}
